Skip to content

test: relax min assertion in test-performance-eventloopdelay#63100

Open
marcopiraccini wants to merge 1 commit intonodejs:mainfrom
marcopiraccini:flaky-eventloopdelay-min
Open

test: relax min assertion in test-performance-eventloopdelay#63100
marcopiraccini wants to merge 1 commit intonodejs:mainfrom
marcopiraccini:flaky-eventloopdelay-min

Conversation

@marcopiraccini
Copy link
Copy Markdown
Contributor

@marcopiraccini marcopiraccini commented May 3, 2026

Fixes this flacky test issue: #41286

I think the test is wrong and it should check min >= 0.
monitorEventLoopDelay configures the histogram with lowest_discernible_value = 1000 ns. hdr_min() returns the lower bound of the bucket the smallest sample landed in, and for that config the first bucket is [0, 512) ns — lower bound 0.

So min === 0 just means the smallest sample fell into the first bucket.
In other words, seems to me that the assert is wrong, and min === 0 is legit

This PR fixes the assert.

Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels May 3, 2026
@marcopiraccini marcopiraccini marked this pull request as ready for review May 3, 2026 13:34
@codecov
Copy link
Copy Markdown

codecov Bot commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.65%. Comparing base (b2f6aa3) to head (612b555).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #63100   +/-   ##
=======================================
  Coverage   89.65%   89.65%           
=======================================
  Files         712      712           
  Lines      220512   220512           
  Branches    42289    42287    -2     
=======================================
+ Hits       197690   197697    +7     
  Misses      14663    14663           
+ Partials     8159     8152    -7     

see 17 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants